import { Loading } from "element-ui";

export default {
  data() {
    return {
      //loading
      loadService: Object.create(null)
    };
  },
  methods: {
    loadAction: function (val, target) {
      if (target) {
        this.loadService = Loading.service({target: target, text: val});
      } else {
        this.loadService = Loading.service({text: val});
      }
      this.loadService = Loading.service({text: val});
    },
    loadClose: function() {
      try {
          this.loadService.close();
      }catch (e) {
      }
    }
  }
}
